import { CountDown } from '@antmjs/vantui';
import { Text, View } from '@tarojs/components';

export default function CutDown(props: { value: number; onFinish: Function }) {
  return (
    <View
      className='w-[292px] h-[116px] bg-cover text-white pl-[104px] pt-[60px] mt-2 leading-none'
      style={{
        backgroundImage: `url(https://applets-1302975996.cos.ap-nanjing.myqcloud.com/zhb/icon-status-bg-1.png)`,
      }}
    >
      <Text className='text-[16px] block'>确认倒计时</Text>
      {props.value && (
        <CountDown
          onFinish={() => props.onFinish()}
          time={props.value}
          className=' text-lg  font-bold italic leading-none text-white'
        />
      )}
    </View>
  );
}
